import request from '@/utils/request'

// 查询保养单列表
export function listMaintenanceOrder(query) {
  return request({
    url: '/ldzl-sb/maintenance/order/list',
    method: 'get',
    params: query
  })
}

// 查询保养单详细
export function getMaintenanceOrder(id) {
  return request({
    url: '/ldzl-sb/maintenance/order/' + id,
    method: 'get'
  })
}

// 新增保养单
export function addMaintenanceOrder(data) {
  return request({
    url: '/ldzl-sb/maintenance/order',
    method: 'post',
    data: data
  })
}

// 修改保养单
export function updateMaintenanceOrder(data) {
  return request({
    url: '/ldzl-sb/maintenance/order',
    method: 'put',
    data: data
  })
}

// 删除保养单
export function delMaintenanceOrder(id) {
  return request({
    url: '/ldzl-sb/maintenance/order/' + id,
    method: 'delete'
  })
}

// 获取保养计划列表
export function getMaintenancePlanList() {
  return request({
    url: '/ldzl-sb/maintenance/plan/list',
    method: 'get'
  })
}

// 获取设备列表
export function getEquipmentList() {
  return request({
    url: '/ldzl-sb/equipment/list',
    method: 'get'
  })
} 